package com.yumingjaing;

import com.yumingjaing.starter.MyStarter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@ImportResource(locations = {"classpath:springApplication.xml"})
@RestController
public class Jdk8to21Application {

    public static void main(String[] args) {
        SpringApplication.run(Jdk8to21Application.class, args);
    }

    @Autowired
    private MyStarter myStarter;

    @GetMapping("/testStarter")
    public String testStarter(){
        return myStarter.getJjVersion();
    }
}
